Fixed PR10574: http://llvm.org/bugs/show_bug.cgi?id=10574 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@137522 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/map b/include/map index 2bb3523..886aecf 100644 --- a/include/map +++ b/include/map
@@ -774,6 +774,18 @@ map(map&& __m, const allocator_type& __a); _LIBCPP_INLINE_VISIBILITY + map& operator=(map&& __m) + _NOEXCEPT_(is_nothrow_move_assignable<__base>::value) + { + __tree_ = _VSTD::move(__m.__tree_); + return *this; + } + +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES + +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + + _LIBCPP_INLINE_VISIBILITY map(initializer_list<value_type> __il, const key_compare& __comp = key_compare()) : __tree_(__vc(__comp)) { @@ -788,21 +800,13 @@ } _LIBCPP_INLINE_VISIBILITY - map& operator=(map&& __m) - _NOEXCEPT_(is_nothrow_move_assignable<__base>::value) - { - __tree_ = _VSTD::move(__m.__tree_); - return *this; - } - - _LIBCPP_INLINE_VISIBILITY map& operator=(initializer_list<value_type> __il) { __tree_.__assign_unique(__il.begin(), __il.end()); return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY explicit map(const allocator_type& __a) @@ -943,10 +947,14 @@ insert(__e.__i_, *__f); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + _LIBCPP_INLINE_VISIBILITY void insert(initializer_list<value_type> __il) {insert(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __p) {return __tree_.erase(__p.__i_);} _LIBCPP_INLINE_VISIBILITY @@ -1523,6 +1531,18 @@ multimap(multimap&& __m, const allocator_type& __a); _LIBCPP_INLINE_VISIBILITY + multimap& operator=(multimap&& __m) + _NOEXCEPT_(is_nothrow_move_assignable<__base>::value) + { + __tree_ = _VSTD::move(__m.__tree_); + return *this; + } + +#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES + +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + + _LIBCPP_INLINE_VISIBILITY multimap(initializer_list<value_type> __il, const key_compare& __comp = key_compare()) : __tree_(__vc(__comp)) { @@ -1537,20 +1557,13 @@ } _LIBCPP_INLINE_VISIBILITY - multimap& operator=(multimap&& __m) - _NOEXCEPT_(is_nothrow_move_assignable<__base>::value) - { - __tree_ = _VSTD::move(__m.__tree_); - return *this; - } - - _LIBCPP_INLINE_VISIBILITY multimap& operator=(initializer_list<value_type> __il) { __tree_.__assign_multi(__il.begin(), __il.end()); return *this; } -#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES + +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS _LIBCPP_INLINE_VISIBILITY explicit multimap(const allocator_type& __a) @@ -1679,10 +1692,14 @@ __tree_.__insert_multi(__e.__i_, *__f); } +#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + _LIBCPP_INLINE_VISIBILITY void insert(initializer_list<value_type> __il) {insert(__il.begin(), __il.end());} +#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS + _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __p) {return __tree_.erase(__p.__i_);} _LIBCPP_INLINE_VISIBILITY